#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
float Function(int h)
{
	if (h <= 10)
	{
		return 30;
	}
	else if (h > 10 && h <= 50)
	{
		return 3 * h;
	}
	else
	{
		return 2.5 * h;
	}
}
int main()
{
	int h;
	cin >> h;
	cout << Function(h) << endl;
	return 0;
}